POST
/
v1
/
shipping
/
shipments
/
{id}
/
pack
Pack Shipment
curl --request POST \
  --url https://{base_url_domain}/api/global/v1/shipping/shipments/{id}/pack \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "packages": [
    {
      "type": "ShipmentPackage",
      "id": 123,
      "actual_weight": {
        "value": 20,
        "unit": "lb"
      },
      "dimensions": {
        "length": 8,
        "width": 6,
        "height": 4,
        "unit": "in"
      },
      "customs_value": {
        "amount": 99,
        "currency": "USD"
      },
      "declared_value": {
        "amount": 99,
        "currency": "USD"
      },
      "regulation_type": "normal",
      "tracking_number": "<string>",
      "tracking_description": "<string>",
      "tracking_url": "<string>",
      "tracking_ref": "<string>",
      "alt_tracking_number": "<string>",
      "alt_tracking_description": "<string>",
      "billable_weight": {
        "value": 20,
        "unit": "lb"
      },
      "dimensional_weight": {
        "value": 20,
        "unit": "lb"
      },
      "dimensional_weight_divisor": {
        "value": 139,
        "unit": "in^3/lb"
      },
      "total_item_volume": {
        "value": 300,
        "unit": "in^3"
      },
      "total_void_percent": 123,
      "container_style": "rigid_box",
      "num_cartons": 123,
      "sscc": "<string>",
      "manifest_code": "<string>",
      "items": [
        {
          "sku": "<string>",
          "name": "<string>",
          "quantity": 123,
          "weight": {
            "value": 20,
            "unit": "lb"
          },
          "hazmat_unit_weight": {
            "value": 20,
            "unit": "lb"
          },
          "customs_value": {
            "amount": 99,
            "currency": "USD"
          },
          "order_item_id": 123,
          "order_item_sku": "<string>",
          "order_item_quantity": 123
        }
      ],
      "container": {
        "type": "Product",
        "id": 3
      },
      "infill": {
        "type": "Product",
        "id": 3
      },
      "packaging": {
        "product": {
          "type": "Product",
          "id": 3
        },
        "quantity": 4
      },
      "collected_data": {
        "label": "<string>",
        "value": "<string>"
      }
    }
  ],
  "complete_packing": true,
  "return_label": false,
  "print_label": false,
  "printers": {
    "small_label": "small-printer-01",
    "label": "label-printer-01",
    "laser": "laser-printer-01"
  },
  "post_automation_url": "https://automation.example.com/shipment/packed",
  "solution_override": {
    "solution_id": 12345,
    "reason": "Container size adjustment required",
    "comment": "Customer requested specific packaging",
    "mark_solution_invalid": false
  },
  "mark_solution_invalid": false,
  "initial_solution_id": 54321,
  "ship_offline": false,
  "confirmed_instructions": {
    "123": 2,
    "456": 1
  }
}'
{
  "warnings": [
    "Address validation warning"
  ],
  "labels": {
    "shipping_label": "aSDinaTvuI8gbWludGxpZnk=",
    "customs_documents": "aSDinaTvuI8gbWludGxpZnk=",
    "bill_of_lading": "aSDinaTvuI8gbWludGxpZnk=",
    "hazmat_shipping_papers": "aSDinaTvuI8gbWludGxpZnk=",
    "hazmat_shippers_declaration": "aSDinaTvuI8gbWludGxpZnk=",
    "sscc_pack_label": "aSDinaTvuI8gbWludGxpZnk="
  },
  "messages": [
    "Labels have been sent to the label printer (label-printer-01).",
    "Customs Documents have been sent to the laser printer (laser-printer-01)."
  ]
}

Authorizations

Authorization
string
header
required

Generate a JWT access token through a Custom Global Integration and provide it with each request in the Authorization header prefixed with "Bearer" and then a single space.

Path Parameters

id
integer
required

The id of the referenced Shipment.

Required range: x >= 1

Body

application/json

Optional request parameters for packing, labeling, and printing operations.

packages
ShipmentPackage · object[]

Describes each package and its contents.

complete_packing
boolean
default:false

If true, completes the packing process. This includes creating a shipping label (if applicable) and marking the shipment as 'Packed'. Required to be true if return_label or print_label is true and no existing label exists.

Example:

true

return_label
boolean
default:false

Whether to return the generated shipping labels in the response as base64-encoded PDF data. Requires complete_packing to be true or an existing shipping label to be present. Labels are returned in the response under the labels key.

Example:

false

print_label
boolean
default:false

Whether to send the generated labels to the specified printers. Requires complete_packing to be true or an existing shipping label to be present. Must specify appropriate printer parameters based on shipment type.

Example:

false

printers
object

Specifies the printers to be used. The required printers depend on the shipment contents and type when print_label is true.

  • small_label is required for printing SSCC labels when the print target is configured for small labels.
  • label is required for parcel shipping labels or for SSCC labels when the print target is configured for standard labels.
  • laser is required for freight shipments, hazmat shipments, or other documents like customs forms and bills of lading.
post_automation_url
string<uri>

URL to send shipment data to after successful packing operation. Must be a valid HTTP or HTTPS URL. Shipment data including ID, tracking info, and package data will be transmitted to this URL via an HTTP POST request synchronously. Any 200 response will be considered a success. Any non-200 response will be considered an error, and the request body will be truncated to 255 characters and displayed to the user and added as a history comment to the order.

The JSON-encoded payload contains the following keys: shipment_id, external_id, order_unique_id, order_ref, carrier_code, shipping_method, batch_tag, automation_data, website_code, store_code, shipment_weight, shipment_weight_unit, order_weight, order_weight_unit, is_international, is_documents_required, and stock_id.

Example:

"https://automation.example.com/shipment/packed"

solution_override
object

Packing solution override parameters for manual or automatic solution adjustment. Used to specify alternative packing solutions or create new ones.

mark_solution_invalid
boolean
default:false

Whether to mark the current packing solution as invalid/disabled. When true, disables the current solution after packing is complete. Cannot be used in combination with other solution override parameters.

Example:

false

initial_solution_id
integer

ID of the initial packing solution to set on the shipment before processing. Used to establish a baseline solution before applying any overrides.

Example:

54321

ship_offline
boolean
default:false

Whether to pack the shipment in offline mode without carrier API integration. When true, skips carrier API calls and address validation. Useful for situations where carrier services are unavailable.

Example:

false

confirmed_instructions
object

Object mapping instruction IDs to quantities for order instructions that have been confirmed. Keys are instruction IDs (as strings), values are the quantities confirmed. Used to record fulfillment of special order instructions during packing.

Example:
{ "123": 2, "456": 1 }

Response

Shipment packed successfully

warnings
string[]

Any warnings generated during the packing process

Example:
["Address validation warning"]
labels
object

Base64-encoded PDF labels (returned only when return_label is true). Available keys depend on shipment type and requirements.

messages
string[]

Status messages about printing operations (returned only when print_label is true)

Example:
[
"Labels have been sent to the label printer (label-printer-01).",
"Customs Documents have been sent to the laser printer (laser-printer-01)."
]